<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加</title>
    {include file="include/top"}

</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-tags" id="layuiadmin-app-form-tags"
     style="padding-top: 30px; text-align: center;">
    <div class="layui-form-item">
        <label class="layui-form-label">上级ID</label>
        <div class="layui-input-inline">
            <input type="number" readonly disabled value="{$id}" name="pathid" lay-verify="required"
                   placeholder="请输入..." autocomplete="off" class="layui-input">
        </div>
    </div>
    {if $ty==1}
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-inline">
            <select name="classty" lay-filter="classty">
                <option value="1" {if $gid>0 && $rule['classty']==1}selected{/if}>系统功能</option>
                <option value="2" {if $gid>0 && $rule['classty']==2}selected{/if}>一级菜单</option>
                <option value="3" {if $gid>0 && $rule['classty']==3}selected{/if}>二级页面</option>
                <option value="4" {if $gid>0 && $rule['classty']==4}selected{/if}>三级页面(非目录)</option>
            </select>
        </div>
    </div>
    {/if}
    <div class="layui-form-item">
        <label class="layui-form-label">分类名</label>
        <div class="layui-input-inline">
            <input type="text" value="{if $gid>0}{$rule['title']}{/if}" name="tags" lay-verify="required"
                   placeholder="请输入..." autocomplete="off" class="layui-input">
        </div>
    </div>
    {if $ty==1}
    <div class="layui-form-item">
        <label class="layui-form-label">方法名</label>
        <div class="layui-input-inline">
            <input type="text" value="{if $gid>0}{$rule['name']}{/if}" name="action" lay-verify="required"
                   placeholder="controller/action" autocomplete="off" class="layui-input">
        </div>
    </div>
    {/if}
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline">
            <input type="text" value="{if isset($rule.sortid)}{$rule.sortid}{/if}" name="sortid" lay-verify="required"
                   placeholder="数字也大越靠前 默认0" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">记录日志</label>
        <div class="layui-input-inline">
            <input type="checkbox" name="writeLog" {if isset($rule.log) && $rule.log==1}checked{/if} title="记录日志">
        </div>
    </div>
</div>

{include file="include/js"}
<script>
    layui.config({
        base: '../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function () {
        var $ = layui.$
            , form = layui.form;
    })
</script>
</body>
</html>